﻿using Entity.ERP;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Security.Permissions;
using System.Text;
using System.Threading.Tasks;

namespace Dal
{
    public class ERPDbContext : DbContext
    {
        public ERPDbContext()
        {
            Database.SetInitializer<ERPDbContext>(null);
        }

        /// <summary>
        /// 重新定义数据库连接的契约
        /// </summary>
        /// <param name="modelBuilder">契约存储对象</param>
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            //移除复数表名的契约
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }

        public DbSet<is_account> is_account { get; set; }
      
    }
}
